package com.finance.service.customer;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import com.finance.dao.customer.TokenMapper;
import com.finance.entity.customer.Token;

@Service("TokenService")
public class TokenService {

	@Resource(name = "TokenMapper")
	private TokenMapper tokenMapper;

	public void deleteByPrimaryKey(Integer tokenId) {
		tokenMapper.deleteByPrimaryKey(tokenId);
	}
	
	public void insert(Token record){
		tokenMapper.insert(record);
	}
	
	public Token selectByPrimaryKey(Integer tokenId){
		return tokenMapper.selectByPrimaryKey(tokenId);
	}
	
	public void updateByPrimaryKeySelective(Token record){
		tokenMapper.updateByPrimaryKeySelective(record);
	}
	
	public Token findByUserIdType(@Param("kfUserId")String kfUserId,@Param("bizType")String bizType){
		return tokenMapper.findByUserIdType(kfUserId, bizType);
	}
	public void updateByPrimaryKey(Token record){
		tokenMapper.updateByPrimaryKey(record);
	}
	
	public List<Token> findByList(String kfUserId){
		return tokenMapper.findByList(kfUserId);
	}
}
